package cn.gemframe.exception.status;

public enum GemErrorStatus {
	OK(0,"ok","请求成功"),

	//系统用户异常
	USER_ISNULL(100001,"用户信息为空",""),
	USER_NOTFOUND(100002,"用户信息错误",""),
	USER_ISHAVE(100003,"用户已存在",""),
    TOKEN_ISNULL(100004,"access_token或refresh_token不能为空",""),
    PASSWORD_ERROR(100005,"密码错误",""),
    AUTHENTICATION_FAILED(100006,"认证失败",""),
    NOT_USER(100007,"用户不存在",""),
    USER_LOGINS(100008,"用户已经登录",""),
    NOT_PERMISSIONS(100009,"没有权限",""),
	PARAMETER_ERROR(100010,"参数非法",""),
	CREATE_TOKEN_ERROR(100011,"token创建异常",""),
	REQUEST_ERROR(100012,"请求异常",""),
	SEND_MAIL(100013,"邮件发送异常",""),
	PHONE_EMAIL_ISNULL(100014,"用户名不能为空",""),
	VRIFICATION_ERROR(100015,"验证码错误",""),
	MAIL_CONFIG_ISNULL(100016,"邮箱配置为空",""),
	MAIL_USERNAME_ISNULL(100017,"邮箱账号为空",""),
	MAIL_PASSWORD_ISNULL(100018,"邮箱密码为",""),
	MAIL_HOST_ISNULL(100019,"邮箱host为空",""),
	METHOD_ERROR(100020,"请求非法",""),
	LOGOUT_ERROR(100021,"退出异常",""),


	//数据库操作异常
	DB_INSERT_ERROR(900001, "保存失败！", ""),
	DB_DELETE_ERROR(900002, "删除失败！", ""),
	DB_UPDATE_ERROR(900003, "更新失败！", ""),
	DB_SELECT_ERROR(900004, "查询失败！", ""),
	DB_UNKONW_ERROR(900005, "未知操作异常！", ""),

	//系统异常
	PARAM_ERROR(999995,"参数异常",""),
	SYSTEM_ERROR(999996,"服务器异常",""),
	NET_ERROR(999997,"网络异常",""),
	SYSTEM(999998,"系统正在维护",""),
	SYS_ERROR(999999,"系统错误",""),
	;

	
	private Long code;
	private String msg;
	private String frontMsg;

	private GemErrorStatus(long code, String msg, String frontMsg) {
		this.code = code;
		this.msg = msg;
		this.frontMsg = frontMsg;
	}

	public Long getCode() {
		return code;
	}

	public void setCode(Long code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getFrontMsg() {
		return frontMsg;
	}

	public void setFrontMsg(String frontMsg) {
		this.frontMsg = frontMsg;
	}
}
